Skip to content

Conversation

@sentrivana
Copy link
Contributor

@sentrivana sentrivana commented Apr 24, 2025

Includes porting the decimal fix and feature flag changes. Would appreciate 👀 on this to make sure it makes sense

DON'T MERGE, this is just for review purposes, the merge commit must be pushed directly to potel-base otherwise we'll get the same merge conflicts again

cmanallen and others added 11 commits April 17, 2025 08:24
Flags evaluated within a span are appended to the span as attributes.

---------

Co-authored-by: Daniel Szoke <[email protected]>
When (at least) one of integrations is enabled (because some
dependencies are installed in the environment), `sentry.sdk.name` is
changed from `sentry.python` to
`sentry.python.[FIRST_ENABLED_INTEGRATION]` which makes
`test_logs_attributes` fail. Prevent failure by relaxing the check.

This change is beneficial not only for packaging (this patch was
required for packaging for Fedora), but also for running tests with
`pytest` directly.

<!-- Describe your PR here -->

---

Thank you for contributing to `sentry-python`! Please add tests to
validate your changes, and lint your code using `tox -e linters`.

Running the test suite on your PR might require maintainer approval.
Bumps
[codecov/codecov-action](https://github.com/codecov/codecov-action) from
5.4.0 to 5.4.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codecov/codecov-action/releases">codecov/codecov-action's
releases</a>.</em></p>
<blockquote>
<h2>v5.4.2</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: hotfix oidc by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1813">codecov/codecov-action#1813</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codecov/codecov-action/compare/v5.4.1...v5.4.2">https://github.com/codecov/codecov-action/compare/v5.4.1...v5.4.2</a></p>
<h2>v5.4.1</h2>
<h2>What's Changed</h2>
<ul>
<li>build(deps): bump github/codeql-action from 3.28.10 to 3.28.11 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1786">codecov/codecov-action#1786</a></li>
<li>chore(release): wrapper -0.2.1 by <a
href="https://github.com/codecov-releaser-app"><code>@​codecov-releaser-app</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1788">codecov/codecov-action#1788</a></li>
<li>build(deps): bump actions/upload-artifact from 4.6.1 to 4.6.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1798">codecov/codecov-action#1798</a></li>
<li>build(deps): bump github/codeql-action from 3.28.11 to 3.28.12 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1797">codecov/codecov-action#1797</a></li>
<li>build(deps): bump github/codeql-action from 3.28.12 to 3.28.13 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1803">codecov/codecov-action#1803</a></li>
<li>fix: use the github core methods by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1807">codecov/codecov-action#1807</a></li>
<li>chore(release): 5.4.1 by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1810">codecov/codecov-action#1810</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codecov/codecov-action/compare/v5.4.0...v5.4.1">https://github.com/codecov/codecov-action/compare/v5.4.0...v5.4.1</a></p>
<h2>v5.4.1-beta</h2>
<h2>What's Changed</h2>
<ul>
<li>build(deps): bump github/codeql-action from 3.28.10 to 3.28.11 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1786">codecov/codecov-action#1786</a></li>
<li>chore(release): wrapper -0.2.1 by <a
href="https://github.com/codecov-releaser-app"><code>@​codecov-releaser-app</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1788">codecov/codecov-action#1788</a></li>
<li>build(deps): bump actions/upload-artifact from 4.6.1 to 4.6.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1798">codecov/codecov-action#1798</a></li>
<li>build(deps): bump github/codeql-action from 3.28.11 to 3.28.12 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1797">codecov/codecov-action#1797</a></li>
<li>build(deps): bump github/codeql-action from 3.28.12 to 3.28.13 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1803">codecov/codecov-action#1803</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codecov/codecov-action/compare/v5.4.0...v5.4.1-beta">https://github.com/codecov/codecov-action/compare/v5.4.0...v5.4.1-beta</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md">codecov/codecov-action's
changelog</a>.</em></p>
<blockquote>
<h2>v5.4.2</h2>
<h3>What's Changed</h3>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codecov/codecov-action/compare/v5.4.1..v5.4.2">https://github.com/codecov/codecov-action/compare/v5.4.1..v5.4.2</a></p>
<h2>v5.4.1</h2>
<h3>What's Changed</h3>
<ul>
<li>fix: use the github core methods by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1807">codecov/codecov-action#1807</a></li>
<li>build(deps): bump github/codeql-action from 3.28.12 to 3.28.13 by
<code>@​app/dependabot</code> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1803">codecov/codecov-action#1803</a></li>
<li>build(deps): bump github/codeql-action from 3.28.11 to 3.28.12 by
<code>@​app/dependabot</code> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1797">codecov/codecov-action#1797</a></li>
<li>build(deps): bump actions/upload-artifact from 4.6.1 to 4.6.2 by
<code>@​app/dependabot</code> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1798">codecov/codecov-action#1798</a></li>
<li>chore(release): wrapper -0.2.1 by
<code>@​app/codecov-releaser-app</code> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1788">codecov/codecov-action#1788</a></li>
<li>build(deps): bump github/codeql-action from 3.28.10 to 3.28.11 by
<code>@​app/dependabot</code> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1786">codecov/codecov-action#1786</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codecov/codecov-action/compare/v5.4.0..v5.4.1">https://github.com/codecov/codecov-action/compare/v5.4.0..v5.4.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/codecov/codecov-action/commit/ad3126e916f78f00edff4ed0317cf185271ccc2d"><code>ad3126e</code></a>
fix: hotfix oidc (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1813">#1813</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/cf3f51a67d2820f7a7cefa0831889fbbef41ca57"><code>cf3f51a</code></a>
chore(release): 5.4.1 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1810">#1810</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/e4cdaba82f2510a623b98430c48d84b0d8764a4f"><code>e4cdaba</code></a>
fix: use the github core methods (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1807">#1807</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/f95a404f9265da16dee374e6e9dcb76d3eee88b1"><code>f95a404</code></a>
build(deps): bump github/codeql-action from 3.28.12 to 3.28.13 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1803">#1803</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/ea99328d1c4d5f39fda7cbffe104afd6906c50b0"><code>ea99328</code></a>
build(deps): bump github/codeql-action from 3.28.11 to 3.28.12 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1797">#1797</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/13d0469d01f6a59fcfbc75f685ac31aa0cae3aef"><code>13d0469</code></a>
build(deps): bump actions/upload-artifact from 4.6.1 to 4.6.2 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1798">#1798</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/3440e5ef70c638a9f44602a80ab017feee1309fe"><code>3440e5e</code></a>
chore(release): wrapper -0.2.1 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1788">#1788</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/cd4e7cf31ae2a4bcefb694e31a62869ebbd161af"><code>cd4e7cf</code></a>
build(deps): bump github/codeql-action from 3.28.10 to 3.28.11 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1786">#1786</a>)</li>
<li>See full diff in <a
href="https://github.com/codecov/codecov-action/compare/v5.4.0...v5.4.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=codecov/codecov-action&package-manager=github_actions&previous-version=5.4.0&new-version=5.4.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anton Pirker <[email protected]>
Make types that users can use when configuring the SDK public. 

Accompaniyng docs update:
getsentry/sentry-docs#13437

Fixes #4127
Toxgen should only consider the highest patch release of each
`major.minor` version. For the most part this was working fine as long
as the releases were ordered as expected in PyPI, but in cases where a
lower patch version succeeded a higher patch version in the release list
from PyPI, we would incorrectly consider the lower patch version as
well, instead of ignoring it in favor of the higher patch.

Example:
- we pull releases `[1.2.3, 1.2.4, 1.2.5, 1.2.2]` from PyPI (in that
order)
- we consolidate `1.2.3, 1.2.4, 1.2.5` into one version, `1.2.5`, as
expected
- `1.2.2` will not disappear into `1.2.5` because of a faulty check in
toxgen and will instead be considered as a new version
- our resulting list of releases eligible for testing will be `[1.2.5,
1.2.2]` instead of just `[1.2.5]`, which then results in picking
versions that are not nicely spaced apart
@sentrivana sentrivana changed the title Ivana/potel/sync with master again Sync with master again Apr 24, 2025
@codecov
Copy link

codecov bot commented Apr 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.37%. Comparing base (6d2e988) to head (d7e2c21).
Report is 14 commits behind head on potel-base.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@              Coverage Diff               @@
##           potel-base    #4326      +/-   ##
==============================================
+ Coverage       84.36%   84.37%   +0.01%     
==============================================
  Files             144      144              
  Lines           14636    14647      +11     
  Branches         2326     2328       +2     
==============================================
+ Hits            12348    12359      +11     
  Misses           1561     1561              
  Partials          727      727              
Files with missing lines Coverage Δ
sentry_sdk/feature_flags.py 90.62% <100.00%> (+0.96%) ⬆️
sentry_sdk/integrations/asgi.py 91.94% <100.00%> (ø)
sentry_sdk/integrations/launchdarkly.py 90.32% <100.00%> (-0.31%) ⬇️
sentry_sdk/integrations/openfeature.py 80.00% <100.00%> (-1.82%) ⬇️
sentry_sdk/integrations/unleash.py 89.47% <100.00%> (-0.53%) ⬇️
sentry_sdk/opentelemetry/sampler.py 91.40% <100.00%> (ø)
sentry_sdk/tracing.py 80.41% <100.00%> (+0.41%) ⬆️
sentry_sdk/tracing_utils.py 84.46% <100.00%> (+0.07%) ⬆️
sentry_sdk/types.py 100.00% <100.00%> (ø)

@sentrivana sentrivana force-pushed the ivana/potel/sync-with-master-again branch 3 times, most recently from 67f56bf to 3fe6c9e Compare April 24, 2025 14:18
@sentrivana sentrivana force-pushed the ivana/potel/sync-with-master-again branch from 3fe6c9e to d7e2c21 Compare April 24, 2025 14:25
flag_count = self.get_attribute("flag.count") or 0
if flag_count < _FLAGS_CAPACITY:
self.set_attribute(f"flag.evaluation.{flag}", value)
self.set_attribute("flag.count", flag_count + 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to remove this flag.count in the span processor at the end?

We should probably cleanup some of these internal attributes at the end in general, since it costs money to get indexed and stored.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do in a new PR!

@sentrivana sentrivana merged commit d7e2c21 into potel-base Apr 28, 2025
129 checks passed
@sentrivana sentrivana deleted the ivana/potel/sync-with-master-again branch April 28, 2025 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants